class DroiteTest
{
	public static void main(String[] args)
	{
		Point p1 = new Point(1, 1);
		Point p2 = new Point(5, 3);
		Point p3 = new Point(0, 4);
		Point p4 = new Point(4, 6);
		Point p;
		
		Droite d1 = new Droite(0, 1, 2);
		Droite d2 = new Droite(p1, p2); //nice way
		Droite d3 = Droite.create(p3, p4); //different way
		Droite d4 = new Droite(0, 12, 24);
		
		System.out.println("d1 is "+(d1.isHorizontal() ? "" : "not ")+"horizontal");
		System.out.println("d2 is "+(d2.isHorizontal() ? "" : "not ")+"horizontal");
		System.out.println("d3 is "+(d3.isHorizontal() ? "" : "not ")+"horizontal");
		System.out.println("d1 is "+(d1.isVertical() ? "" : "not ")+"vertical");
		System.out.println("d2 is "+(d2.isVertical() ? "" : "not ")+"vertical");
		System.out.println("d3 is "+(d3.isVertical() ? "" : "not ")+"vertical");
		System.out.println("d1, d2 inter? "+((p=d1.intersection(d2))!=null ? p.toString() : "para"));
		System.out.println("d1, d3 inter? "+((p=d1.intersection(d3))!=null ? p.toString() : "para"));
		System.out.println("d2, d3 inter? "+((p=d2.intersection(d3))!=null ? p.toString() : "para"));
		System.out.println("d1 and d2 are "+(d1.equals(d2) ? "" : "not ")+"the same");
		System.out.println("d1 and d4 are "+(d1.equals(d4) ? "" : "not ")+"the same");
	}
}
